package com.atom.module.image.filter;

public class AutoAdjustFilter implements IImageFilter {

    public float contrastIntensity = 0.5f;
    public float intensity = 0.5f;

    public Image process(Image imageIn) {
        HistogramEqualFilter hee = new HistogramEqualFilter();
        hee.ContrastIntensity = contrastIntensity;
        imageIn = hee.process(imageIn);

        AutoLevelFilter ale = new AutoLevelFilter();
        ale.Intensity = intensity;
        return ale.process(imageIn);
    }

    @Override
    public String toString() {
        return "AutoAdjustFilter{" +
            "ContrastIntensity=" + contrastIntensity +
            ", Intensity=" + intensity +
            '}';
    }
}
